package com.huanying.goodjob.job;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.huanying.goodjob.skill.Skill;

@Entity
@Table(name = "jobitem_skill")
public class Jobitem_Skill implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 6004179188186468175L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
	
	private int jobitem_id;
	
	@OneToOne(cascade = CascadeType.ALL)
	@NotFound(action = NotFoundAction.IGNORE)
	@JoinColumn(name = "skill_id")
	private Skill skill;
	
	@Column(name="status",nullable=false,columnDefinition="INT default 1")
	private int status;		//状态  0停用  1正常

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}


	public int getJobitem_id() {
		return jobitem_id;
	}

	public void setJobitem_id(int jobitem_id) {
		this.jobitem_id = jobitem_id;
	}


	public Skill getSkill() {
		return skill;
	}

	public void setSkill(Skill skill) {
		this.skill = skill;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

}
